﻿Option Explicit On
Imports System

Imports System.Data.Common

Namespace SplitData2TableAdapters
    Partial Public Class BudgetDetails1TableAdapter
        Inherits System.ComponentModel.Component

        Public Function GetDataByFilter(ByVal dataTable As SplitData2.BudgetDetails1DataTable, ByVal SQLExpression As String) As Integer
            Dim text1 As String
            text1 = Me.CommandCollection(0).CommandText
            Try
                Me.CommandCollection(0).CommandText = SQLExpression
                Return Me.Fill(dataTable)
            Catch ex As Exception

            Finally
                Me.CommandCollection(0).CommandText = text1
            End Try
        End Function
        Public Function GetCountData(ByVal SQL As String) As Integer
            Dim text1 As String
            text1 = Me.CommandCollection(1).CommandText
            'Try
            Me.CommandCollection(1).CommandText = SQL
            Return Val(Me.CountData)
        End Function

        Public Function GetAmountData(ByVal SQL As String) As Decimal
            Dim text1 As String
            text1 = Me.CommandCollection(2).CommandText
            'Try
            Me.CommandCollection(2).CommandText = SQL
            Return Me.getAmount
        End Function

    End Class
    Partial Public Class Budget12TableAdapter
        Inherits System.ComponentModel.Component

        Public Function GetDataByFilter(ByVal dataTable As SplitData2.Budget12DataTable, ByVal SQLExpression As String) As Integer
            Dim text1 As String
            text1 = Me.CommandCollection(0).CommandText
            Try
                Me.CommandCollection(0).CommandText = SQLExpression
                Return Me.Fill(dataTable)
            Catch ex As Exception

            Finally
                Me.CommandCollection(0).CommandText = text1
            End Try
        End Function
      

    End Class
End Namespace
